package com.edu.service.impl;

import com.edu.bean.Goods;
import com.edu.dao.GoodsDao;
import com.edu.dao.impl.GoodsDaoImpl;
import com.edu.service.GoodsService;

import java.util.List;

/**
 * @Author:xgdxqr
 * @Date:2025/9/19-14:43-45
 **/

public class GoodsServiceImpl implements GoodsService {
    private GoodsDao goodsDao = new GoodsDaoImpl();
    @Override
    public List<Goods> getGoods(int pageSize,int pageNum) {
        List<Goods> listGoods = goodsDao.selectGoods( pageSize, pageNum);
        return listGoods;
    }

    @Override
    public int getAllGoodsRows() {
        return goodsDao.selectRow();
    }

    @Override
    public int deleteById(int goodsId) {
        return goodsDao.deleteById(goodsId);
    }
}
